﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WpfUMLTry1.Model.Fight;

namespace WpfUMLTry1.Model.Classes
{
    class Rogue : PlayerCharacter
    {
        public Rogue(String _name)
            : base(_name)
        {
            bMaxFuel = 100;
            fuel = maxFuel;
            fuel_t = Model.FuelType.ENERGY;
            setSkillSet();
        }

        public Rogue(String[] loadedData, String name) : base(loadedData, name)
        {
            setSkillSet();
        }

        public override void BasicAttack(AbstractCreature target)
        {
            base.BasicAttack(target);
        }

        protected override void setSkillSet()
        {
            skillSet = new List<Fight.BasicSkill>(2);
            skillSet.Add(new BasicSkill()
            {
                cost = 40,
                basicAttackDelayBonus = 0,
                basicAttackDelayMultiplier = 0.75,
                name = "Fast Attack",
                flatSkillDamage = new AttackStruct(),
                percentageDamage = new AttackStruct()
            });
            skillSet[0].percentageDamage.IncreaseAttackValue(AttackTypes.Physical, 90);    //150% basic attack dmg

            skillSet.Add(new BasicSkill()
            {
                cost = 60,
                basicAttackDelayBonus = 0,
                basicAttackDelayMultiplier = 1,
                name = "Throw Dagger",
                flatSkillDamage = new AttackStruct(),
                percentageDamage = new AttackStruct(),
            });
            skillSet[1].percentageDamage.IncreaseAttackValue(AttackTypes.Physical, 150);    //75% basic attack dmg
        }

        public override string getBackSavingText()
        {
            String sStr = "Rogue\n";
            sStr += base.getBackSavingText();
            return sStr;
        }

        public override void StepInToNewFight()
        {
            fuel = maxFuel;
        }

        public override void RestInTheInn()
        {
            fuel = maxFuel;
        }

        public override void fightingTimerElapsed()
        {
            base.fightingTimerElapsed();
            if (fuel < 100)
                fuel += 2;
        }
    }
}
